Neural-network state-of-charge estimation

ABSTRACT

An approach to control or monitoring of battery operation makes use of a recurrent neural network (RNN), which receives one or more battery attributes for a Lithium ion (Li-ion) battery, and determines, based on the received one or more battery attributes, a state-of-charge (SOC) estimate for the Li-ion battery.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Application No. 62/588,510, filed Nov. 20, 2017, which is incorporated by reference.

PRIOR DISCLOSURES BY INVENTOR

Ephrem Chemali, Phillip J. Kollmeyer, Matthias Preindl, Ryan Ahmed, and Ali Emadi. “Long short-term memory networks for accurate state-of-charge estimation of Li-ion batteries.” IEEE Transactions on Industrial Electronics 65, no. 8 (August 2018): 6730-6739. This publication is incorporated herein by reference.

BACKGROUND

This application relates to state-of-charge estimation for batteries using artificial neural networks, and in particular relates to use of Long Short-Term Memory (LSTM) neural networks.

State-of-Charge (SOC) is maybe defined as the remaining charge within the battery pack and is given by the residual capacity of the battery divided by its nominal capacity. There exists no direct way to measure SOC, therefore estimation approaches are used. SOC estimation is important for reliable operation of the electric powered vehicles because this quantity directly gauges a vehicle?s remaining driving range and is used for the battery balancing system. SOC estimation can be a cumbersome task since the battery undergoes erratic dynamics during repeated acceleration and deceleration of electrified vehicles.

In general, the SOC can be considered to be a nonlinear function of variables including temperature and past discharge/charge current. Traditionally, two SOC estimation techniques have been used; open circuit voltage based techniques and coulomb counting. These are commonly known to have their limitations and have been generally displaced by more sophisticated methods. Typically, these methods use an (adaptive) cell model, voltage, and current measurements to issue an estimate, e.g. Luenberger observer, adaptive observer, sliding mode observer, and Kalman Filters. These strategies tend to be computationally intensive and typically require additional parameters or different models to perform SOC estimation at varying ambient conditions.

Strategies involving data analytics have also been used in the past; these have relied on conventional machine learning techniques such as Support Vector Machines (SVM) and Neural Networks.

SUMMARY

In one aspect, in general, an approach to control or monitoring of battery operation makes use of a recurrent neural network (RNN), which receives one or more battery attributes for a Lithium ion (Li-ion) battery, and determines, based on the received one or more battery attributes, a state-of-charge (SOC) estimate for the Li-ion battery.

In another aspect, in general, a method for monitoring battery operation includes receiving by a recurrent neural network (RNN) a time series of values one or more battery attributes for a battery. Based on the received time series, the RNN determines a state estimate for the battery.

Aspects can include one or more of the following.

The battery comprises a rechargable battery

Receiving the time series of values of the attributes includes receiving a time series spanning multiple charging and discharging cycles.

Receiving time time series of the values the one or more battery attributes comprises receiving values of one or more of a battery voltage, a battery current, and a battery temperature.

The battery comprises a Lithium-ion (Li-ion) battery.

The state estimate for the battery comprises a time series of values of state estimates corresponding to the time series of the values of the one or more battery attributes.

The state estimate comprises a state-of-charge (SOC) estimate.

The state estimate for the battery comprises data representative of one or more of battery capacity, and battery resistance.

Operation of at least one of the battery or a system powered by the battery is controlled based on the determined state estimate for the battery.

The RNN is periodically configured according to one or more of age of the battery, and a long-term condition of the battery.

The recurrent neural network includes a memory cell configured to be selectively updated according to inputs to the recurrent neural network.

The recurrent neural network comprises a Long Short-Term Memory cell.

In another aspect, in general, a system for monitoring battery operation includes at least one sensor for measuring one or more battery attributes of at least one battery. A recurrent neural network (RNN) system is configured according to stored numerical parameters to receive a time series of values one or more battery attributes for a battery from the at least one sensor, and determining, based on the received time series, a state estimate for the battery. The RNN comprises a memory cell configured to be selectively updated according to inputs to the recurrent neural network. The one or more battery attributes may include a battery voltage, a battery current, and a battery temperature.

Advantages of one or more embodiments may include the the following.

The training algorithm for the RNN can self-learn all the network parameters thereby freeing researchers from hand-engineering and parameterizing the models themselves. In contrast, other in at least some traditional methods, only after the parameters are fitted to a battery model, and after the time-consuming covariance matrix in a Kalman filter is determined, for example, can the algorithm operate in the field.

The machine learning technique allows encoding of the characteristic behavior at different ambient temperatures within the network while maintaining great estimation accuracy at these different ambient temperatures.

State of Charge (SOC) estimation is critical to ensure reliable operation of the electric drive since this quantity directly gauges a vehicle's remaining driving range and is necessary for the battery balancing system. However, SOC estimation is a cumbersome task since the battery undergoes erratic dynamics during repeated acceleration and deceleration of electrified vehicles. Because there exists no direct way to measure SOC, the solution to technical problem of SOC estimation is critical to operation of the vehicle.

Other features and advantages of the invention are apparent from the following description, and from the claims.

DESCRIPTION OF DRAWINGS

FIG. 1 is a system including a State-of-Charge (SOC) estimation system.

FIG. 2 is an architecture of a recurrent neural network.

FIG. 3 is a Long Short-Term Memory cell.

FIG. 4 is is an experimental setup including a) a photograph of equipment used for battery testing, b) a flowchart of the battery test procedure and c) a schematic of the test bench and data logging system.

FIG. 5 is a set of graphs of drive cycle power profiles, scaled for a single cell of 35 kWh pack for a Ford F150 electric truck: a) HWFET, b) UDDS, c) LA92, d) US06.

FIG. 6 is a set of graphs for a US06 drive cycle recorded at an ambient temperature of 25° C. and 0° C.

FIG. 7 is a set of graphs of performance on the Charging Test Case.

FIG. 8 is is a set of performance graphs.

FIG. 9 is a plot of performance for different amounts of training data.

FIG. 10 is a pair of corresponding graphs of performance with correct and incorrect initialization.

FIG. 11 is a set of graphs of performance with incorrect initialization.

FIG. 12 is a graph of performance on Test Case 1.

FIG. 13 is a set of graphs of performance with rising ambient temperature.

DETAILED DESCRIPTION

System Overview

Embodiments of the approach described below are used to process a time series of measurable characteristics of a battery system and output an estimate of a state of a battery system. The battery system may be referred to below as a “battery” understanding that the term may include other elements, including electronics and physical systems of the battery system. In particular, embodiments of the approach are directed to output of an estimate of a state of charge (SOC) of the battery system. In general, the SOC represents the remaining electrical charge in the battery system, for example, as measure in units of electrical charge (e.g., Coulombs) or as corresponding quantity (e.g., a normalized number between 0% and 100% representing a fractional charge state of the battery system).

The measurable characteristics may be represented as a vector of real quantities x_(k) for the k^(th) sample in the series. (In some description below, the variable Ψ_(k) is used synonymously to represent such a vector of quantities.) For example, the characteristics are measured at a rate of one vector measurement per second. For example, each vector may include the terminal current, the terminal voltage, and a battery temperature at the measurement time. The measurement does not necessarily include all three of these quantities, and may include other quantities, such as an age of battery system. Furthermore, related quantities, such as normalized current and voltage (e.g., normalized by nominal or maximum values for the battery system) and time averaged or filtered versions of such signals may be used may be used in addition or as alternatives.

The estimates of the battery state are represented as a real scalar or vector quantity y_(k) for each time sample. For example, as introduced above, for each time sample, the output y_(k) may be a number between 0.0 and 1.0. (In some description below, the variable SOC_(k) is used to represent such a state of charge.)

In general, the approach implements a non-linear function y_(k)=N(x₁, x₂, . . . , x_(k)), which accumulates the information in the history of measurements from the time the battery system was known to be in a fully charged state (e.g., at time index 1). A recurrent structure may be used in which a hidden estimation state s_(k) is maintained such that the output y_(k) is a (generally non-linear) function of s_(k), and s_(k) is a (generally non-linear) function of x_(k) and s_(k−1).

Various structures of the function N may be used, and in general, the function is parameterized by a set of parameters that are estimated (“trained”) in a manner described more fully below. One particular structure that may be used is a Recurrent Neural Network (RNN) with one hidden layer. In such an example, the function N is parametrized by numerical matrices U, V, and W, that define the function according to the following computations: u _(k) =W ^(T) s _(k−1) +U ^(T) x _(k) s _(k)=η_(s)(u _(k)) o _(k) =V ^(T) s _(k) y _(k)=η_(o)(o _(k))

where η_(s) and η_(o) are non-linear scalar functions that are applied element-wise to their arguments. For example, these may be selected from a sigmoid function, a hyperbolic tangent, and a rectifier (i.e., maximum of zero and the argument). More than one layer may be optionally used.

In order to determine the parameters of the function N, which may also be referred to as “weights,” a training data set is used. For example, an accurate battery system state y_(k)* is monitored, for example, using an accurate “Coulomb counting” apparatus, as well as the corresponding measurable quantities x_(k). One or more sequence (x_(k), y_(k)*), k=1, . . . , T are collected, and are collectively referred to as the “training data” for the parameter estimation. For example, each sequence corresponds to repeated charge-discharge cycles of one battery system.

Various approaches to parameter estimation may be used to match the training data according to a specified quantified objective L(y_(k), y_(k)*). For example, the objective may be

${\sum\limits_{k}^{\;}{L\left( {y_{k},y_{k}^{*}} \right)}} = {\frac{1}{2}{\sum\limits_{k}^{\;}\left( {y_{k} - y_{k}^{*}} \right)^{2}}}$ or ${\sum\limits_{k}^{\;}{L\left( {y_{k},y_{k}^{*}} \right)}} = {\sum\limits_{k}^{\;}{{y_{k} - y_{k}^{*}}}^{2}}$

Referring to FIG. 1, an exemplary state of charge (SOC) estimation system 100 is configured to make a determination of a state of charge (SOC) of a battery 102. In this example, the battery 102 is a Lithium ion (Li-ion) battery, but other battery technologies may be addressed with the same approach. The battery may be part of a battery powered system 150, which includes the battery 102, a controller 110 coupled to the battery, and a plant 160, which may be a source and/or sink of power. Very generally, the controller 110 in this example is coupled to the battery over a power connection 111 (e.g., two electrical conductors), and optionally is coupled over a control path over which environmental control may be exerted on the battery (e.g., temperature, pressure, etc.). The controller mediates power transfer between the battery 102 and the plant 162, which is coupled to the controller over a power connection 162. In some examples, the SOC estimation system 100 may be configured to provide an estimate of the SOC of the battery 102 to the controller 110; in other examples, the SOC estimation system 100 operates without communication with the controller 110, for example, providing the estimate of the SOC via a gauge 109 to a user.

The SOC estimation system 100 includes sensors 112, 113 that are used to monitor the battery 102 and provide quantitative attributes associated with the battery over time, for example, as a time-sampled digitized signal. A first sensor 112 monitors environmental or other physical conditions of the battery, for instance temperature, pressure, or age while a second sensor 113 monitors the power connection 112 over which power flows into and out of the battery, and provides attributes including voltage (e.g., voltage across the two conductors, or across two terminals of the battery to which such conductors are connected) and current passing over the conductors of the power connection and/or an accumulation or other averaging or filtering of current over time). Together, all the attributes monitored by the sensors 112, 113 form a vector time signal 104, with the k^(th) sample denoted x_(k) or Ψ_(k).

The SOC estimation system 100 includes a SOC estimator 106, which receives the attributes 104 from the sensors 112, 113, and outputs a SOC estimate 108. As introduced above, the SOC estimate may optionally be provided back to the controller 110 for the battery, to a gauge 109, or for other purposes (e.g., logging, long-term battery health assessment, etc.). The SOC estimator 106 is parameterized estimator and configured with values of a set of configuration parameters. In this example, the SOC estimator makes use of a particular structure of a recurrent neural network (RNN), which is described in more detail below. As discussed above, the output of the SOC estimator 106 generally includes the state of charge (e.g., a number between 0% and 100% reprenting the percentage of full capacity remaining in the charge of the battery), but may additionally or alternatively include other quantities characterizing the state of the battery, for instance, an estimate of the internal resistance of the battery, the remaining lifetime of the battery, and so forth.

Classical RNNs generally provide the output of the neural network at time k−1 as an further input at time k augmenting the input provided to the neural network. Such classical RNNs known have certain difficulties capturing long-range dependencies, at least in part resulting from training procedures in which gradients of the weights either explode or vanish during training. The neural network structure used in this exemplary embodiment include RNNs with Long Short-Term Memory (LSTM) cells to better capture long-term dependencies within a sequence of battery attributes.

Neural Network

A LSTM-RNN, whose architecture is shown in FIG. 2, can represent nonlinear dynamic systems by mapping input sequences to output sequences [Hochreiter and Schmidhuber, 1997]. The input data is given by Ψ_(k)=[V(k), I(k), T(k)] where V(k), I(k) and T(k) represent the voltage, current and temperature of the battery at time step k. h_(k−1) denotes the hidden layer of the LSTM-RNN at time step k−1. The output of the LSTM-RNN is the estimated SOC at every time step.

When LSTM-RNNs are applied towards SOC estimation, a typical dataset used to train the networks is given by D={(Ψ₁, SOC₁*), (Ψ₂, SOC₂*), . . . , (Ψ_(N), SOC_(N)*)}, where SOC_(k)* is the ground-truth value or the observable state-of-charge value at time step k and Ψ_(k) is the vector of inputs also at time step k. The vector of inputs is defined as Ψ_(k)=[V(k), I(k), T(k)], where V(k), I(k), T(k) are the voltage, current and temperature of the battery measured at time step k, respectively. The Long Short-Term Memory cell whose schematic representation is shown in FIG. 3, is equipped with a memory cell, c_(k), which stores the long-term dependencies. Ψ_(k) and h_(k−1) are the input data layer at current time step, k, and hidden layer at previous time step, k−1, respectively. i_(k), o_(k), f_(k) and c_(k) are the input, output and forget gates as well as the memory cell, respectively. Cells with sigmoidal notations represent nonlinearities outlined in equation 1.

During training, the input, output and forget gates allow the LSTM to forget or write new information to the memory cell. The overall LSTM-RNN cell is therefore automatically configured such that the memory cell maintains a most useful summary of past operation of the battery to be used in making estimates of the battery state in the future.

The LSTM unit can be represented by the following composite function, i _(k)=η(W _(Ψi)Ψ_(k) +W _(hi) h _(k−1) +b _(i)) f _(k)=η(W _(Ψf)Ψ_(k) +W _(hf) h _(k−1) +b _(f)) c _(k) =f _(k) c _(k−1) +i _(k) tan h(W _(Ψc)Ψ_(k) +W _(hc) h _(k−1) +b _(c)) o _(k)=η(W _(Ψo)Ψ_(k) +W _(ho) h _(k−1) +b _(o)) h _(k) =o _(k) tan h(c _(k)),  (1)

where the initial hidden state, h₀, is set to a zero matrix, η is the sigmoid function and i, f, o and c are the input, forget, output gates and memory cell, respectively. They are called gates since they are a sigmoid function which can be zero valued thus possessing the ability to inhibit the flow of information to the next computational node. Each gate possesses its set of network weights which are denoted by W. The subscripts of W describe the transformation occurring between the two respective components, e.g. the input-output gate matrix is denoted by W_(Ψo), the hidden-input gate matrix is denoted by W_(hi), etc. A bias, b, is added to the matrix multiplication at each gate to increase the networks flexibility to fit the data. A final fully-connected layer performs a linear transformation on the hidden state tensor h_(k) to obtain a single estimated SOC value at time step k. This is done as follows: SOC_(k) =V _(out) h _(k) +b _(y),  (2)

where V_(out) and b_(y) are the fully-connected layer's weight matrix and biases, respectively. The disparity between the LSTM-RNN's estimated SOC and the measured one is best represented by the following loss function computed at the end of each forward pass;

$\begin{matrix} {{L = {\sum\limits_{k = 0}^{N}{\frac{1}{2}\left( {{SOC}_{k} - {SOC}_{k}^{*}} \right)^{2}}}},} & (3) \end{matrix}$

where N is the length of the sequence and SOC_(k) as well as SOC_(k)* are the estimated and ground truth values of SOC at time step k, respectively. A forward pass starts when the training data is fed into the network and ends when the SOC estimates are generated at each time step as well as when the errors and the overall loss are calculated. However, a training epoch, ϵ, includes one forward pass and one backward pass which is when the network weights, W, and biases, b, are updated. To do this, an optimization method called Adam is used [Kingma and Ba, 2014] to update the network weights and biases based on the gradient of the loss function. This is given by:

$\begin{matrix} {{m_{\epsilon} = {\beta_{1}m_{\epsilon - 1}{\nabla{L\left( W_{\epsilon - 1} \right)}}}}{r_{\epsilon} = {\beta_{2}r_{\epsilon - 1}{\nabla{L\left( W_{\epsilon - 1} \right)}^{2}}}}{{\overset{\sim}{m}}_{\epsilon} = {m_{\epsilon}/\left( {1 - \beta_{1}^{\epsilon}} \right)}}{{\overset{\sim}{r}}_{\epsilon} = {r_{\epsilon}/\left( {1 - \beta_{2}^{\epsilon}} \right)}}{{W_{\epsilon} = {W_{\epsilon - 1} - {\alpha\frac{{\overset{\sim}{m}}_{\epsilon}}{{\overset{\sim}{r}}_{\epsilon} - \kappa}}}},}} & (4) \end{matrix}$

where, L is the loss function, β₁ and β₂ are decay rates in some examples set to 0.9 and 0.999, respectively, α=10⁻⁴ is the training step size and K is a constant term set in some examples to 10⁻⁸. W_(ϵ) denotes the matrix of neural network parameters (“weights”) at the current training epoch and can be a placeholder for W_(Ψi), W_(hi), W_(Ψf), etc. These gate matrices, the output weight matrix, V_(out), as well as the biases are initialized with a normally distributed random number generator having mean 0 and standard deviation of 0.05. It is only during training that a forward and backward pass are performed to continuously update the network weights until a convergence criteria is met. With the backward pass, the network self-learns its weights, offering significant improvements over traditional SOC estimation strategies which require the time-consuming construction and parameterization of hand-engineered battery models.

During validation, a forward pass is solely required to generate the estimated SOC values at each time step and no backward pass is needed since the network parameters have already been learned during training. The LSTM-RNN offers an advantage of lower computational overhead, once trained, since a forward pass is comprised of a series of matrix multiplications. This, in general, is less computationally intensive than other algorithms, which might contain differential equations, for example. In addition, the LSTM-RNN, as will be shown in the results section below, has the ability to encode the characteristic behavior of a battery at numerous ambient temperatures thus reducing the memory required to store different parameters for different ambient temperatures as is typically done for traditional battery models. Therefore, these latter advantages make LSTM-RNN a great candidate to perform estimation separately on many cells in a battery pack.

Many unique drive cycles are concatenated to form the training dataset and when compiled, this typically has a length of over 100,000 time steps. It may not be possible to enter a sequence as long as this into the training system (e.g. constrained by GPU memory), therefore, the LSTM-RNN models may be trained by feeding one batch of the sequence at a time which is commonly performed while training LSTM-RNNs. This is referred to as unrolling the LSTM cell in time for Ñ steps where Ñ is the batch length holding a smaller value than the total training sequence length, N, such that Ñ<N. Usually, if the time constant of the inherent dynamics within the sequence is shorter than Ñ, then the LSTM-RNN can still capture the time dependencies.

To evaluate the estimation performance of our networks, a few different error functions may be used. These include the Mean Absolute Error (MAE), the RMS error, the standard deviation of the errors (STDDEV) and the maximum error (MAX).

Experiments and Results

A Panasonic 18650 battery cell with a lithium nickel cobalt aluminum oxide (LiNiCoAlO₂ or NCA) chemistry, similar to the cell used in some Tesla vehicles, was tested [Panasonic, 2016]. The battery, which is rated to have 43 mΩ dc resistance has the following characteristics:

-   -   Nominal Open Circuit Voltage: 3.6V     -   Capacity: Min. 2.75 Ah/Typ. 2.9 Ah     -   Min/Max Voltage: 2.5V/4.2V     -   Mass/Energy Storage: 48 g/9.9 Wh     -   Minimum Charging Temperature: 10° C.     -   Cycles to 80% Capacity: 500 (100% DOD, 25° C.)

All the testing was performed in a thermal chamber with cell testing equipment manufactured by Digatron Firing Circuits, as described below and shown in FIG. 4a ).

-   -   Cycler Manufacturer: Digatron Firing Circuits     -   Test Channel Used: 25 A, 0-18V channel     -   Voltage/Current Accuracy: +/−0.1% Full Scale     -   Data Acquisition Rate Used: 10 Hz     -   Thermal Chamber: Cincinnati Sub Zero ZP-8     -   Size: 8 cu. Ft.     -   Accuracy: +/−0.5° C.

To generate training and validation data for the recurrent neural network, the battery was exposed to a selection of drive cycles at ambient temperatures ranging from 0 to 25° C. A set experimental procedure was used, as is described in FIG. 4b ). A schematic of the experimental apparatus is shown in FIG. 4c ). The thermal chamber was first set to 25° C. followed by a 3 hour pause to allow the battery's internal temperature to reach 25° C. The battery was then fully charged with a constant current charge rate of 2.9 A (1 C) followed by a constant voltage charge at 4.2 V which was terminated when current fell below 50 mA. The thermal chamber temperature was then set to the desired ambient temperature to record the subsequent drive cycle, and, in turn, this was paused for three hours again to allow the battery's internal temperature to reach steady state. The battery is then discharged using a drive cycle power profile which includes regenerative braking (i.e. charging) power if the ambient temperature is greater than or equal to 10° C., the minimum temperature for which the battery is rated to charge. The current sensor that is used to measure current and to calculate capacity has an error of less than 25 mA. For the typical dataset, this sums to a cumulative error of under 40 mAh which is small compared to the 2900 mAh of battery capacity.

During experimentation, the battery was exposed to 10 drive cycles. Each dataset consisted of a random combination of different drive cycles which included HWFET, UDDS, LA92 and US06. Constructing these unique datasets which were composed of various drive cycles, having a spectrum of different dynamics, provided the LSTM-RNN with a broad range of realistic driving conditions. These 10 cycles were applied on the battery at three different ambient temperatures (0, 10, or 25° C.). Training of the LSTM-RNN is performed on a subset of these 10 cycles (typically 8 to 9 cycles) and will henceforth be referred to as the training data while validation is performed on a completely different subset of cycles (usually 1 or 2) which are henceforth referred to as test cases. An additional test case, called the Charging Test Case, is recorded at 25° C. to examine the network's performance over a charging profile. Furthermore, a second additional test case is recorded during experimentation which exposes the battery cell to an ambient temperature increasing from 10 to 25° C. and is used to validate the LSTM-RNN's ability to adapt to a varying temperature. The drive cycle power profiles used are for an electric Ford F150 truck [Kollmeyer, 2015, Kollmeyer et al., 2012], with the power profile scaled for a single cell of a 35 kWh pack consisting of 3,680 of the Panasonic NCR18650PF cells. The power profile for the drive cycles has discharge power (negative power) as great as 40 W per cell and charge power (positive power) as great as 35 W per cell, as is shown in FIG. 5. This translates to peak current of around 18 A, or 6 C, which is a fairly typical peak C-rate for an electric vehicle application. The power profile is repeated until the battery's usable capacity is depleted. This is defined as 2.61 Ah when discharged at an ambient temperature of 25° C., 2.5 Ah at 10° C. and 2.32 Ah at 0° C.

The measured voltage, current, amp-hours, and battery surface temperature are shown in FIG. 6 for the US06 drive cycle at an ambient temperature of 25° C. and 0° C. At 25° C. the current is relatively low, ≤3 C, and the battery voltage drop is not too significant. The temperature, measured at the surface of the cylindrical cell with a thermocouple, increases by a few degrees over the first 70 minutes of the drive, and then spikes to 34° C. as the terminal voltage falls, resistance increases, and the loss therefore increases. At 0° C., the battery resistance is much higher, resulting in significant voltage drop as is shown in FIG. 6. The higher resistance coupled with no regenerative braking energy due to the low temperature state, results in the drive cycle being repeated for 50 minutes at 0° C., while this was repeated for 85 minutes at 25° C. The battery also heats significantly, up to 13° C., due to the higher loss at low temperature.

Although the example LSTM-RNN tested is trained on data obtained from a Panasonic 18650PF cell, the same LSTM-RNN can be trained on any other type of battery cell. The network architecture does not need to change from one battery cell to another. The network might need to be retrained for a completely different battery, but it's architecture and the values of the network hyperparameters, like the learning rate, can remain the same.

As mentioned above, the vector of inputs fed into the LSTM-RNN is defined as Ψ_(k)=[V(k), I(k), T(k)], where V(k), I(k), T(k) are the voltage, current and temperature measurements of the battery at time step k, respectively. The mixed drive cycles were logged at a sampling frequency of 1 Hz and they ranged roughly between 4000 and 10000 seconds long. The following two subsections investigate the LSTM-RNN's SOC estimation accuracy when trained on a dataset recorded at a constant ambient temperature and at variable ambient temperatures, respectively.

SOC Estimation at Fixed Ambient Temperature

In this section, the network is trained on up to 8 mixed drive cycles while validation is performed on 2 discharge test cases. In addition, a third test case, called the Charging Test Case, which includes a charging profile is used to validate the networks performance during charging scenarios. In addition, the regenerative braking which results in charging currents of over 8 A, as can be seen from FIG. 6, allows us to test the network's performance at higher momentary charge rates. Regenerative braking charging current is not included for validation test cases recorded at the lower temperatures since the battery is not rated to charge at temperatures below 10° C. Celsius. In the Charging Test Case, charging is performed at 1 C (2.9 A). There was interest in examining an even faster charge rate, but the 1 C rate is already twice the datasheet's recommended charge rate so rates that are any higher than this are considered excessive and potentially dangerous. The LSTM-RNN's hidden layer has 500 computational nodes. A smaller number of computational nodes are possible, however the network can converge to a solution much quicker with a larger number of nodes while using a GPU. The computational time needed to train this network is about 4 hours.

The MAE achieved on each of the first two test cases is 0.807% and 1.252%, respectively. The MAE, RMS, STDDEV and MAX performance metrics for these three test cases are outlined in the table below.

Test Case MAE(%) RMS(%) STDDEV(%) MAX(%) Test Case 1 at 0.807 1.075 0.710 2.819 10° C.* Test Case 2 at 1.252 1.541 0.898 4.312 10° C.* Charging Test Case 0.688 0.856 0.510 4.000 at 25° C.** *Results obtained with network having a depth in time of Ñ = 500 **Results obtained with network having a depth in time of Ñ = 1000

The LSTM-RNN also showed good performance when tested on the Charging Test Case where the MAE and MAX achieved is 0.688% and 4.000%, respectively. The estimation performance on the Charging Test Case is shown in FIG. 7. At the final training epoch, the error at every time step of the test case is shown in subplot 2. Also, at every training epoch, these errors over time are used to calculate the MAE. Therefore, a plot of MAE as a function of training epoch is shown in subplot3.

Various tests illustrate the factors which influence the LSTM-RNN's estimation performance and to further validate this estimation strategy. In the first test, three LSTM-RNNs having different depths in time were trained, i.e. where Ñ=250, 500 and 1000 at an ambient temperature of 10° C. The estimated SOC and the error over time of these different LSTM-RNNs are shown in FIG. 8 and their performance metrics are outlined as follows:

Network Depth in Time (Ñ) MAE(%) RMS(%) STDDEV(%) MAX(%) 250 1.303 1.670 1.043 5.380 500 0.672 0.863 0.293 3.015 1000 0.573 0.690 0.148 2.569 Networks trained on data recorded at ambient temperature of 10° C.

To maintain an unbiased comparison between the network architectures tested, training is stopped at 15000 epochs in each case. It is observed that the networks having larger depths in time which are exposed to more historical data perform better than those exposed to a smaller amount of historical data. However, the increase in estimation accuracy is not linearly proportional to depth in time since going from Ñ=250 to Ñ=500 reduces the MAE by about a half however, going from Ñ=500 to Ñ=1000 offers only a 15% reduction in MAE.

Another test is performed to measure the amount of training data needed to achieve good estimation accuracy. Therefore, instead of training the LSTM-RNN on a training dataset composed of 8 concatenated mixed drive cycles, as done to achieve the results in the first table above, FIG. 7, FIG. 8 and the table above, we record the estimation accuracy of LSTM-RNNs trained on different numbers of mixed drive cycles. This is shown in FIG. 9, where LSTM-RNNs are trained on one to nine mixed drive cycles and the MAE and max error measured over Test Case 1 are plotted in a bar graph. The more training data the network was exposed to, the more accuracy was achieved, however after a certain amount of training data (6-8 drive cycles), diminishing returns are obtained. Interestingly, the LSTM-RNN is able to achieve a MAE of below 1% when training is conducted on 3 or more drive cycles. This can be very advantageous since the LSTM-RNN can learn it's network parameters and achieve accurate SOC estimates after being exposed to relatively small amounts of training data.

Two additional tests are conducted to examine the LSTM-RNN's performance when either an incorrect initialization is given to the network or when the test drive cycle begins at different SOC levels. Giving an LSTM-RNN an incorrect initialization requires setting the hidden layer state at time step k=0 to zero. This is the only way to test for the case of incorrect initialization since the input vector given to the LSTM-RNN at every time step includes V(k), I(k) as well as T(k). SOC at time step k−1 or older are not used as feedback to the network. When correctly initialized, where h₀=h*, an LSTM-RNN achieves good performance with MAE=0.776% on Test Case 1 which begins at SOC=70%, shown in FIG. 10. When given an incorrect initialization, where h₀=0, the LSTM-RNN struggles to estimate SOC at the start of the drive cycle (SOC=70%), where the error is about 27%, but quickly converges to a good state-of-charge estimate within the first 70 seconds of the drive cycle. Further validation is performed on this front by examining whether an LSTM-RNN that is deeper in time can converge quicker if given an incorrect initialization. This is shown in FIG. 11 where two LSTM-RNNs, one having depth in time of Ñ=500 and the other having Ñ=1000, are tested with incorrect initialization on Test Case 1 beginning at a SOC of 100%. It's clear that the LSTM-RNN which has a depth in time of Ñ=1000 seconds converges in less than 50 seconds which turns out to be faster than the LSTM-RNN having Ñ=500.

SOC Estimation at Varying Ambient Temperatures

A LSTM-RNN is constructed to handle a larger training dataset which is composed of 27 drive cycles. These 27 drive cycles include three sets of 9 drive cycles; each set is recorded at 0° C., 10° C. and 25° C. Another different mixed drive cycle, which is not a part of the training data, is used as a test case to validate the network's performance at each temperature. In particular, there are two goals that we desired to achieve within this second study. The first is to train the LSTM-RNN on datasets recorded at more than one ambient temperature such that one single LSTM-RNN can estimate SOC at different ambient temperature conditions. The second goal is to examine the LSTM-RNN's capability to interpolate its ability to estimate SOC at ambient temperatures different than the ones on which it was trained. The LSTM cell used in this study is unrolled for Ñ=1000 time steps and the time required to train this network is about 9 hours.

The estimation performance of this single LSTM-RNN is shown in FIG. 12 where estimation performed at 25° C., 10° C. and 0° C. are plotted in a), b) and c), respectively. The MAE achieved at these three ambient temperatures is 0.774, 0.782 and 2.088. The MAE, RMS, STDDEV and MAX metrics achieved over all three ambient temperatures are outlined in the following table:

SOC estimation accuracy of LSTM-RNN trained on multiple ambient temperature data Ambient Temperature MAE(%) RMS(%) STDDEV(%) MAX(%) 25° C. 0.774 1.110 0.796 3.692 10° C. 0.782 0.995 0.616 4.047  0° C. 2.088 2.444 1.270 6.687 Varying 1.606 2.038 1.256 5.815 Temperature

The performance is good and validates the LSTM-RNN's ability to encode the dynamics experienced by a Li-ion battery at various ambient temperatures into the parameters of a single network.

The single LSTM-RNN performed well for estimation on the validation test cases recorded at three different constant ambient temperatures however, battery-powered vehicles can undergo a change in ambient temperature of more than 10° C. over the course of one day depending on the climate or the geographical location within which they operate. Hence, an interesting test is to examine its performance on a test case, not included in the training data, which is recorded at a changing ambient temperature. Therefore, the LSTM-RNN's performance over a test case where the ambient temperature in the thermal chamber is increased from 10° C. to about 25° C. is shown in the table above, and in FIG. 13. The MAE achieved on this test case is 1.606% and showcases the LSTM-RNN's ability to perform estimation at ambient temperatures between 10° C. and 25° C. to which it is not exposed during the training process. This can be a great advantage if training data is scarce.

In some parameter estimation approaches, a gradient-based approach is used in which the parameter values are iteratively updated according to a computed gradient of the objective. One such gradient-based approach is a Back-Propagation procedure, but it should be understood that other procedures such as stochastic gradient procedures may equivalently be used.

The RNN structure introduced above should be understood to be only one example of a non-linear function structure that can be used to capture the cumulative effects of the measured quantities to yield accurate estimates of the battery state. For example, the transformation from input x_(k) and past state s_(k−1) to hidden state s_(k) may use a deep neural network (DNN) structure with three, four, or more hidden layers. Convolutional neural networks can be used as well. That is, many different neural architectures can be used, the main ones being Recurrent Neural Networks (also RNN with LSTM or GRU), Deep Feedforward Neural Networks and Convolutional Neural Networks. A particular choice for structure of the non-linear function is a Long Short-Term Memory (LSTM) RNN, with details for such an implementation provided in the appended documents referenced below.

In some examples, the weights used in the estimation of battery states are selected based, for example, on the age of the battery system or other long-term conditions. For example, different weights are trained in different long-term conditions, thereby accommodating characteristically different non-linear mappings from observation to battery state.

The description above focuses on the battery state being the state of charge of the battery. Instead or in addition to the state of charge, a state of health of the battery system (e.g., capacity, peak voltage, internal resistance, self-discharge rate, etc.) may be estimated based on measurements in a like manner based on accurate measurements used to form appropriate training data sets.

Additional approaches, and features that may be incorporated into approaches described above, are described in U.S. Provisional Application 62/769,039, titled “Feedforward Neural-Network State-of-Charge Estimation,” filed on Nov. 19, 2018, which is incorporated herein by reference.

The runtime estimation approach (i.e., implementation of the function N) may be implemented in software, in hardware, or in a combination of hardware and software. For example, software may include instructions, stored on a non-transitory machine-readable medium, that are executed on a processor (e.g., a general-purpose computer, embedded controller etc.). Hardware may include an Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), discrete circuitry, and the like. The implementation may use digital representations of the quantities expressed above, with the measurements being digitized with Analog to Digital Converters (ADCs). In some implementations, some or all of the computations may be implemented using analog representations (e.g., analog voltages or currents). The parameter estimation approach may be implemented in hardware or software. Software implementations may use a general-purpose computers, and optionally may use attached processors such as Graphics Processing Units (GPUs).

REFERENCES

-   [Hochreiter and Schmidhuber, 1997] Hochreiter, S. and     Schmidhuber, J. (1997). Long short-term memory. Neural Computation,     9(8):1735-1780. -   [Kingma and Ba, 2014] Kingma, D. P. and Ba, J. (2014). Adam: A     method for stochastic optimization. CoRR, abs/1412.6980. -   [Kollmeyer, 2015] Kollmeyer, P. J. (2015). Development and     Implementation of a Battery-Electric Light-Duty Class 2a Truck     including Hybrid Energy Storage. PhD thesis, The University of     Wisconsin—Madison. -   [Kollmeyer et al., 2012] Kollmeyer, P. J., Lamb, W., Juang, L. W.,     McFarland, J. D., Jahns, T. M., and Sarlioglu, B. (2012). Design of     an electric powertrain for a ford f150 crew cab truck utilizing a     lithium battery pack and an interior pm synchronous machine drive.     In 2012 IEEE Transportation Electrification Conference and Expo     (ITEC), pages 1-8. -   [Panasonic, 2016] Panasonic (2016). Panasonic NCR18650PF Lithium-Ion     Battery Datasheet (June 2016). 

What is claimed is:
 1. A method for monitoring battery operation, the method comprising: receiving by a recurrent neural network (RNN), encoding characteristic behavior of a battery at multiple different ambient temperatures, a time series of values for one or more battery attributes for the battery, the one or more battery attributes comprising at least a current ambient temperature, wherein the RNN is trained based on backward-pass through the RNN of gradients of a loss function, representing the disparity between an actual state-of-charge value for the battery and a predicted value, computed for training set values corresponding to at least some of the multiple different ambient temperatures provided to the RNN during a respective forward-pass corresponding to the backward pass; and determining by the RNN encoding the characteristic behavior of the battery at the multiple different ambient temperatures, based on the received time series comprising the current ambient temperature, a state estimate for the battery.
 2. The method of claim 1 wherein the battery comprises a rechargeable battery, and wherein receiving the time series of values of the attributes includes receiving a time series spanning multiple charging and discharging cycles.
 3. The method of claim 1, wherein receiving time series of the values the one or more battery attributes comprises receiving values of one or more of a battery voltage, a battery current, and a battery temperature.
 4. The method of claim 1 wherein the battery comprises a Lithium-ion (Li-ion) battery.
 5. The method of claim 1 wherein the state estimate for the battery comprises a time series of values of state estimates corresponding to the time series of the values of the one or more battery attributes.
 6. The method of claim 1 wherein the state estimate comprises a state-of-charge (SOC) estimate.
 7. The method of claim 1, wherein the state estimate for the battery comprises data representative of one or more of battery capacity, and battery resistance.
 8. The method of claim 1, further comprising controlling operation of at least one of the battery or a system powered by the battery based on the determined state estimate for the battery.
 9. The method of claim 1, further comprising periodically configuring the RNN according to one or more of age of the battery, and a long-term condition of the battery.
 10. The method of claim 1 wherein the recurrent neural network includes a memory cell configured to be selectively updated according to inputs to the recurrent neural network.
 11. The method of claim 10 wherein the recurrent neural network comprises a Long Short-Term Memory cell.
 12. A system for monitoring battery operation comprising: at least one sensor for measuring one or more battery attributes of at least one battery; and a recurrent neural network (RNN) system, encoding characteristic behavior of a battery at multiple different ambient temperatures, configured according to stored numerical parameters to: receive a time series of values for one or more battery attributes for the battery from the at least one sensor, the one or more battery attributes comprising at least a current ambient temperature, wherein the RNN system is trained based on backward-pass through the RNN system of gradients of a loss function, representing the disparity between an actual state-of-charge value for the battery and a predicted value, computed for training set values corresponding to at least some of the multiple different ambient temperatures provided to the RNN system during a respective forward-pass corresponding to the backward pass, and determine, based on the received time series comprising the current ambient temperature, a state estimate for the battery; wherein the RNN system comprises a memory cell configured to be selectively updated according to inputs to the recurrent neural network.
 13. The system of claim 12 wherein the one or more battery attributes further comprise: a battery voltage; a battery current; and a battery temperature.
 14. The system of claim 12 wherein the at least one battery comprises a Lithium-ion (Li-ion) battery.
 15. The system of claim 12 wherein the state estimate for the at least one battery comprises a state-of-charge (SOC) estimate.
 16. A non-transitory computer readable media programmed with instructions, executed by a processor, which performs the functions of: receiving by a recurrent neural network (RNN), encoding characteristic behavior of a battery at multiple different ambient temperatures, a time series of values for one or more battery attributes for the battery, the one or more battery attributes comprising at least a current ambient temperature, wherein the RNN is trained based on backward-pass through the RNN of gradients of a loss function, representing the disparity between an actual state-of-charge value for the battery and a predicted value, computed for training set values corresponding to at least some of the multiple different ambient temperatures provided to the RNN during a respective forward-pass corresponding to the backward pass; and determining by the RNN encoding the characteristic behavior of the battery at the multiple different ambient temperatures, based on the received time series comprising the current ambient temperature, a state of charge estimate for the battery. 